/*
 * @Author: zhuxiaoyi
 * @Date: 2023-05-11 15:23:03
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2023-12-21 11:09:34
 * @Description:
 */
import { createWebHistory, createRouter } from "vue-router";
const routes = [
  {
    path: "/index",
    name: "index",
    meta: {
      title: "知识图谱系统",
      keepAlive: true,
      requireAuth: true,
    },
    redirect: "index/guide",
    component: () => import("@/views/index.vue"),
    children: [
      {
        path: "guide",
        name: "guide",
        meta: {
          title: "引导页",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/guide/guide.vue"),
      },

      {
        path: "gathering",
        name: "gathering",
        meta: {
          title: "数据采集",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/gathering/gathering.vue"),
      },
      {
        path: "labeling",
        name: "labeling",
        meta: {
          title: "实体标注",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/labeling/labeling.vue"),
      },
      {
        path: "result",
        name: "result",
        meta: {
          title: "结果导出",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/result/result.vue"),
      },
      {
        path: "model",
        name: "model",
        meta: {
          title: "BRET模型",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/model/model.vue"),
      },
      {
        path: "matching",
        name: "matching",
        meta: {
          title: "模式匹配",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/matching/matching.vue"),
      },
      {
        path: "prediction",
        name: "prediction",
        meta: {
          title: "工具预测",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/prediction/prediction.vue"),
      },
      {
        path: "modelPrediction",
        name: "modelPrediction",
        meta: {
          title: "模型预测",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/modelPrediction/modelPrediction.vue"),
      },
      {
        path: "align",
        name: "align",
        meta: {
          title: "实体对齐",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/align/align.vue"),
      },
      {
        path: "graph",
        name: "graph",
        meta: {
          title: "图谱展示",
          keepAlive: true,
          requireAuth: true,
        },
        component: () => import("@/views/graph/graph.vue"),
      },
    ],
  },
  {
    path: "/",
    redirect: "index/guide",
    meta: {
      title: "",
    },
  },

  {
    path: "/:catchAll(.*)",
    redirect: "/404",
  },
  /*   {
      path: "/404",
      name: "404",
      component: () => import("@/views/notfound/notfound.vue"),
    }, */
  /*   {
      path: "/errorLogs",
      name: "errorLogs",
      component: () => import("@/views/index/errorManage/errors.vue"),
    }, */
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
